﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="RequestedInvigilation.aspx.cs" Inherits="VolunteerInvigilation" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <p>
        List of Exams with You requested help to Invigilate
    </p>
    <p>
        <asp:GridView ID="gridMyInvigilations" runat="server" DataKeyNames="courseID" OnRowCommand="selectRow" >
            <Columns>
                <asp:CommandField SelectText="Show Details" ShowSelectButton="True" />
                <asp:ButtonField CommandName="Cancel" HeaderText="Cancel Request" ShowHeader="True" Text="Cancel Request" />
            </Columns>
        </asp:GridView>
    </p>
    <p>
        <asp:DataList ID="DataList1" runat="server" DataSourceID="Db_Source_ReqInvigExamDetails" BorderColor="#A6AA78" BorderWidth="1px" RepeatDirection="Horizontal">
            <ItemTemplate>
                Date:
                <asp:Label ID="DateLabel" runat="server" Text='<%# Eval("Date") %>' />
                <br />
                StartTime:
                <asp:Label ID="StartTimeLabel" runat="server" Text='<%# Eval("StartTime") %>' />
                <br />
                EndTime:
                <asp:Label ID="EndTimeLabel" runat="server" Text='<%# Eval("EndTime") %>' />
                <br />
                Duration:
                <asp:Label ID="DurationLabel" runat="server" Text='<%# Eval("Duration") +" hours" %>' />
                <br />
                RoomNumber:
                <asp:Label ID="RoomNumberLabel" runat="server" Text='<%# Eval("RoomNumber") %>' />
                <br />
                <br />
            </ItemTemplate>
        </asp:DataList>
        <asp:SqlDataSource ID="Db_Source_ReqInvigExamDetails" runat="server" ConnectionString="<%$ ConnectionStrings:ExamScheduleDBConString %>" SelectCommand="SELECT [Date], [StartTime], [EndTime], [Duration], [RoomNumber] FROM [ExamDetails] WHERE ([CourseID] = @CourseID)">
            <SelectParameters>
                <asp:ControlParameter ControlID="gridMyInvigilations" Name="CourseID" PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
</asp:Content>

